package cn.cvs.service;

import cn.cvs.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserService {


    /*----*/
    //根据用户名和角色id查询信息
    public List<SysUser> getUserByNameAndRoleId(String name,Integer id, Integer pageIndex, Integer pageSize);
    /*用户添加*/
    public int addUser(SysUser sysUser);
    //--用户删除
    public int delUser(Integer id);
    //用户修改
    public int updUser(SysUser sysUser);
    //根据用户id查看详细信息
    public SysUser getUserById(Integer id);

    //登录验证
    public SysUser login(@Param("name")String name,@Param("pwd")String pwd);
    //根据用户名和角色id查询用户数量
    public int getCountByNameAndRoleId(@Param("name")String name,@Param("roleId")Integer id);

    //修改用户密码
    public int updLoginPwd(@Param("loginPwd") String pwd,@Param("loginId") Integer id);
    //验证同名
    public List<SysUser> getUserByName(String name);
    //根据roleId查询用户
    public int getUserByRoleId(Integer roleId);

}
